#ifndef DICERENDER_H
#define DICERENDER_H

#include <QList>

#include <qrender/renderer.h>

class QOpenGLShaderProgram;
class QOpenGLVertexArrayObject;
class QOpenGLBuffer;
class QOpenGLTexture;

/**
 * @brief The DiceRenderer class 骰子渲染类
 *
 * 多个骰子定时旋转 demo
 */
class DiceRenderer : public Renderer
{
public:
    DiceRenderer();
    ~DiceRenderer();

protected:
    void create() override;
    void render(const CameraInfo &camera_info) override;
    void release() override;

private:
    std::shared_ptr<QOpenGLShaderProgram> program_{ nullptr };
    std::shared_ptr<QOpenGLVertexArrayObject> vao_{ nullptr };
    std::shared_ptr<QOpenGLBuffer> vbo_{ nullptr };

    QList<std::shared_ptr<QOpenGLTexture>> textures_;
    QVector<QVector3D> cube_positions_;
};

#endif // DICERENDER_H
